
<div class="modal-header">
    <h3 class="modal-title">新增</h3>
</div>
<div class="modal-body">
    <div class="row">
	    <div class="col-sm-10 ">	      
	        <form class="bs-example form-horizontal">
	            <div class="form-group">
	              <label class="col-lg-3 control-label">学校名称</label>
	              <div class="col-lg-9">
	                   <select class="form-control btn-rounded" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)" ng-model="oo.school_name"  ng-change="oo.buildingtype='';oo.building_name='';oo.layer_name='';">
	                 		<option value="">--请选择学校--</option>
	                 		<option ng-if="key!='所有学校'" ng-repeat="(key,value) in mmData">{{key}}</option>                
	            		</select>     
	              </div>
	            </div>
	            
	            <div class="form-group">
	              <label class="col-lg-3 control-label">楼类型</label>
	                <div class="col-lg-9">
	                    <select class="form-control btn-rounded" ng-model="oo.buildingtype" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)"  ng-change="oo.building_name='';oo.layer_name='';">
		                	<option value="">--请选择类型--</option>
		                	<option ng-if="key!='school_id'&&key!='school_name'&&key!='所有类型'" ng-repeat="(key,value) in mmData[oo.school_name]" value="{{key}}+{{mmData[oo.school_name].school_id}}">{{key}}</option >
		        		</select>       
	                </div>
	            </div>

	            <div class="form-group">
	              <label class="col-lg-3 control-label">楼名称</label>
	                <div class="col-lg-9">
	                    <select class="form-control btn-rounded" ng-model="oo.building_name" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)" ng-change="oo.layer_name='';">
		                 	<option value="">--请选择楼--</option>
		                 	<option ng-if="key!='所有楼'" ng-repeat="(key,value) in mmData[oo.school_name][oo.buildingtype.split('+')[0]]">{{key}}</option>                  
		                </select>
	                </div>
	            </div>

	            <div class="form-group">
	              <label class="col-lg-3 control-label">楼层</label>
	                <div class="col-lg-9">
	                    <select class="form-control btn-rounded" ng-model="oo.layer_name" style="padding: 5px 10px;font-weight: bold;background: rgb(245,245,245)">
		                  <option value="">--请选择层--</option>
		                 <!--  <option value="{{mmData[oo.school_name][oo.buildingtype.split('+')[0]][oo.building_name].campus_id}}+所有层" ng-if="value!=''">所有层</option> -->
		                  <option ng-if="value!='所有层'"  ng-repeat="(key,value) in mmData[oo.school_name][oo.buildingtype.split('+')[0]][oo.building_name].layers" value="{{value.layer_name}}+{{mmData[oo.school_name][oo.buildingtype.split('+')[0]][oo.building_name].campus_id}}+{{value.layer_id}}">                
		                    {{value.layer_name}}
		                  </option>
		                  
		                </select>       
	                </div>
	            </div>

	            <div class="form-group">
	              <label class="col-lg-3 control-label">单元名称</label>
	              <div class="col-lg-9">
	                <input class="form-control"  ng-model="oo.unitname" >
	              </div>
	            </div>

	          </div>


	           </form>
	        </div>
	    </div>
	</div>
</div>
<div class="modal-footer">                  
    <button class="btn btn-default" ng-click="cancel()">取消</button>
    <button class="btn btn-info" ng-click="ok()">确定</button>
</div>
